﻿//-----------------------------------------------------------------------
// <copyright file="HasFlagParameter.cs" company="None">
//     Copyright (c) 2009-2012
// </copyright>
//-----------------------------------------------------------------------

namespace CleanCode.StyleCopCustomRules.UnitTests.Resources
{
    /// <summary>
    /// Dummy class to unit test the customized StyleCop rules.
    /// </summary>
    public class HasFlagParameter
    {
        /// <summary>
        /// Methods the with flag parameter.
        /// </summary>
        /// <param name="doThisOrThat">
        /// if set to <c>true</c> [do this or that].
        /// </param>
        /// <returns>
        /// The method with flag parameter.
        /// </returns>
        public int MethodWithFlagParameter(bool doThisOrThat)
        {
            int x = 0;
            int y = 0;

            if (doThisOrThat)
            {
                // doThis
                // TODO: 'x + y' is currently reported as 'boundary condition' but it shouldn't.
                return x + y;
            }
            else
            {
                // doThat
                // TODO: 'x - y' is currently reported as 'boundary condition' but it shouldn't.
                return x - y;
            }
        }
    }
}
